home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: cs.vu.nl!jalten
- From: jalten@cs.vu.nl (Alten JP)
- Subject: Re: C++ display ASCII file
- Nntp-Posting-Host: kits.cs.vu.nl
- References: <4dtsed$309o@useneta1.news.prodigy.com> <zRgDxQTC387B089yn@pinerolo.gvo.it>
- Sender: news@cs.vu.nl
- Organization: Fac. Wiskunde & Informatica, VU, Amsterdam
- Date: Sat, 3 Feb 1996 09:59:54 GMT
- X-Newsreader: TIN [version 1.2 PL2]
- Message-ID: <DM72Fv.49y.0.-s@cs.vu.nl>
-
- Alberto Velo (albe@pinerolo.gvo.it) wrote:
- : In article <4e144f$82t@spectre.star.harc.edu>,
- : jaewan@diana.harc.edu (Jaewan Kim - ASTRO) wrote:
-
- : >: ifstream src(argv[1], ios::nocreate);
-
- : Why do you use ios::nocreate ? I mean, this is a file you read -not write- and
- : I thought this is not needed.
- : (I'm new to C++ :-)).
-
- You're right. If you look at the source/header of fstream.h you'll
- see thatt the default arguments are something like
- ios::in, no ios::out, so it is readonly.
- The line might just as have been like this:
- ifstream src(argv[1]);
-
- Jelle Paul
-
- --
- +-------------------------------------------------------+
- | Jelle Paul Alten | jalten@cs.vu.nl |
- | Vrije Universiteit Amsterdam | |
- +-------------------------------------------------------+
-